package org.tik.mybatis.reflection;

import org.tik.mybatis.reflection.factory.DefaultObjectFactory;
import org.tik.mybatis.reflection.factory.ObjectFactory;
import org.tik.mybatis.reflection.wrapper.DefaultObjectWrapperFactory;
import org.tik.mybatis.reflection.wrapper.ObjectWrapperFactory;

/**
 * @ClassName: SystemMetaObject
 * @author: pengwei
 * @data 2022年10月24日 19:55:00
 */
public class SystemMetaObject {

    public static final ObjectFactory DEFAULT_OBJECT_FACTORY = new DefaultObjectFactory();
    public static final ObjectWrapperFactory DEFAULT_OBJECT_WRAPPER_FACTORY = new DefaultObjectWrapperFactory();
    public static final MetaObject NULL_META_OBJECT = MetaObject.forObject(NullObject.class, DEFAULT_OBJECT_FACTORY, DEFAULT_OBJECT_WRAPPER_FACTORY);

    private SystemMetaObject() {
        // Prevent Instantiation of Static Class
    }

    /**
     * 空对象
     */
    private static class NullObject {
    }

    public static String print(){
        System.out.println("");
        return "abc";
    }
    public static MetaObject forObject(Object object) {
        return MetaObject.forObject(object, DEFAULT_OBJECT_FACTORY, DEFAULT_OBJECT_WRAPPER_FACTORY);
    }

}
